#define _CRT_SECURE_NO_WARNINGS 1

#include"my_priority_queue.h"

//using namespace Btl;

template<class T>
class Greater
{
public:
	bool operator()(const T& left, const T& right)
	{
		return left > right;
	}
};

void test_min_pq()
{

	Btl::priority_queue<int, std::vector<int>, std::greater<int>> pq;
	pq.push(1);
	pq.push(2);
	pq.push(10);
	pq.push(4);
	pq.push(5);
	pq.push(6);
	pq.push(3);
	pq.push(7);
	pq.push(8);
	pq.push(9);

	while (!pq.empty())
	{
		//std::cout << pq.top() << std::endl;
		std::cout << pq.top() << " ";
		pq.pop();
	}

}

void test_pq()
{
	Btl::priority_queue<int> pq;
	pq.push(1);
	pq.push(2);
	pq.push(10);
	pq.push(4);
	pq.push(5);
	pq.push(6);
	pq.push(3);
	pq.push(7);
	pq.push(8);
	pq.push(9);

	while (!pq.empty())
	{
		//std::cout << pq.top() << std::endl;
		std::cout << pq.top() << " ";
		pq.pop();
	}

	std::cout << std::endl;

	std::vector<int> v(10, 0);
	Btl::priority_queue<int> pq2(v.begin(), v.end());
	while (!pq2.empty())
	{
		//std::cout << pq.top() << std::endl;
		std::cout << pq2.top() << " ";
		pq2.pop();
	}
}

int main()
{
	//test_pq();
	test_min_pq();
	return 0;
}


